Release 10.1A: OpenEdge Development:
Java Open Clients


Extended methods

OpenEdge provides the following methods to extend the Java SDO DataGraph and implement the ProDataGraph class.

getProChangeSummary( )

Returns the ProChangeSummary object associated with this ProDataGraph:

Syntax
ProChangeSummary getProChangeSummary() 

For more information on the ProChangeSummary class, see the "ProChangeSummary class" section.

getProDataObjects( )

Returns the list of ProDataObject instances for the specified temp-table within the ProDataGraph, as specified by the overloaded methods:

Syntax
List getProDataObjects(String tableName) 
List getProDataObjects(int tableIdx) 

tableName

Specifies the 4GL name of a temp-table that identifies this ProDataObject list.

tableIdx

Specifies the 0-based index into the list of temp-table names returned by the getTableNames() method and that corresponds to the specified temp-table. (See the "getTableNames( )" section.)

For more information on the ProDataObject class, see the "ProDataObject class" section.

createProDataObject( )

Returns a new ProDataObject instance for the specified temp-table within the ProDataGraph. A single ProDataObject corresponds to an individual row (record) in the temp-table.

Syntax
ProDataObject createProDataObject(String tableName) 

tableName

Specifies the 4GL name of a temp-table that identifies the meta data used to create the ProDataObject. If there is not a ProDataObjectMetaData object contained within this ProDataGraph for the specified temp-table name, the method throws and Exception. For more information on the ProDataObjectMetaData class, see the "ProDataObjectMetaData class" section.

addProDataObject( )

Adds the ProDataObject instance to its ProDataObject collection within the ProDataGraph, as specified by the overloaded methods:

Syntax
void addProDataObject(ProDataObject dataObj) 
void addProDataObject(int index, ProDataObject dataObj) 

dataObj

Specifies the ProDataObject to add.

index

Specifies the location in the ProDataObject collection to add the ProDataObject. If you do not specify index, the method adds the ProDataObject to the end of the collection.

setChildTableReferences( )

Populates (child) reference property lists for specified ProDataObject collections contained in this ProDataGraph, as specified by the overloaded methods:

Syntax
void setChildTableReferences() 
void setChildTableReferences(int tableIdx) 
void setChildTableReferences(String tableName) 

tableIdx

Specifies the 0-based index into the list of temp-table names returned by the getTableNames() method. (See the "getTableNames( )" section.) The specified temp-table (ProDataObject collection) corresponds to the parent table of a data-relation (ProDataRelationMetaData object) contained in the ProDataGraph.

tableName

Specifies the 4GL name of a temp-table (ProDataObject collection) contained in the ProDataGraph. The specified ProDataObject collection corresponds to the parent table of a data-relation (ProDataRelationMetaData object) contained in the ProDataGraph.

If you do not specify tableIdx or tableName, the method populates the reference property lists for all ProDataObject collections involved as parent tables in data-relations contained in the ProDataGraph.

You only need to call this method when building a ProDataGraph object that contains data-relations, typically after adding one or more ProDataObject instances that participate in data-relations contained in the ProDataGraph. A reference property list is a list of references in a ProDataObject that point to other ProDataObject instances contained by a single ProDataObject collection that is a child table of the ProDataObject containing the references. This parent ProDataObject contains one reference property list for each ProDataRelationMetaData that the ProDataObject is involved in as a parent. For more information on the ProDataRelationMetaData class, see the "ProDataRelationMetaData class" section.

getMetaData( )

Returns the ProDataGraphMetaData object contained by this ProDataGraph:

Syntax
ProDataGraphMetaData getMetaData() 

For more information on the ProDataGraphMetaData class, see the "ProDataGraphMetaData class" section.

getProDataGraphName( )

Returns the name of this ProDataGraph object:

Syntax
java.lang.String getProDataGraphName() 

This name is typically identical to the Progress 4GL name of a ProDataSet to which this ProDataGraph object maps as a parameter of a proxy application service method.

getTableNames( )

Returns a String array of the table names that identify the ProDataObject collections in this ProDataGraph object.

Syntax
java.lang.String[] getTableNames() 

Each table name is typically identical to the Progress 4GL name of a temp-table contained by a corresponding ProDataSet to which this ProDataGraph maps as a parameter of a proxy application service method.

getNumTables( )

Returns the number of ProDataObject collections (number of temp-tables) in this ProDataGraph object:

Syntax
int getNumTables() 

hasError( )

Returns true if the AppServer returned an error message for this ProDataGraph passed as an application service parameter:

Syntax
boolean hasError() 

It is set on return from the AppServer when an update to a data source of the corresponding ProDataSet parameter is not successful.

acceptChanges( )

Clears out the list of changes in the ProChangeSummary of the ProDataGraph, enabling the ProDataGraph to accept a new set of changes:

Syntax
void acceptChanges() 

This method has the same behavior as the ChangeSummary.beginLogging() method. For more information, see the "ProChangeSummary class" section.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095